home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
sound
/
148
/
player.doc
< prev
next >
Wrap
Text File
|
1988-04-03
|
9KB
|
239 lines
PLAYER.PRG
updated 1/1/87
NOTE: This is a test version of the latest Music Studio Song Player.
It contains many enhancements over the original version, and several,
(most notably the Script Processing), have not been thoroughly
debugged. While using this program, if you notice bugs and/or
possible problems, or come up with a mind blowing enhancement, please
contact:
John Davis
72465,227 (Compuserve)
J.W.DAVIS (GEnie)
or the L.A.C.E. BBS at (806)792-3317
Before loading the player program, please make sure that the resource
file is in the same directory as the player program.
THE MAIN DIALOG
The main dialog has been enlarged to include the addition of more
buttons. This means, unfortunately, that the program will no longer
run in low resolution. Sorry...
There have been three new selections added to the main dialog - Midi
Clock ON/OFF, Preset Change ON/OFF, and Channel 1 ON/OFF.
If Midi Clock ON is selected, clock data will be sent along with the
song. This will allow any drum machines or sequencers attached to
keep perfect sync with the song. The first event in the song will
trigger the clock, which spells trouble for those songs which have,
for example, a lead in of 2 beats, followed by measures of 4 beats.
Also, songs which are not 'properly written' (ie an extra 1/32 note
in a measure) will also have trouble. A suggestion has been made
to allow a certain note value on a certain channel to trigger
clock-on and clock-off - this will be implemented if enough feedback
is received.
Preset Change OFF will force all voices to play using the preset you
select on your synth, instead of the preset stored in the song file.
In other words, Program Change Requests will not be sent.
Channel 1 ON will force all voices to play on Channel 1.
In addition, the volume and tempo sliders have been changed to show
the actual values being used on the slider button itself. It is
necessary to click on the blue part of the slider button to move it.
These values range from 0-127 on the volume, which is the midi
velocity that will be sent, and 0-200 on the tempo, which reflects
beats-per-minute.
The SCRIPT button will allow you to load a script file which can
contain names of songs, commands to change volume, tempo, presets,
etc., or commands to send sysex data to your synths. Besides just
creating a midi environment for a song before it is played, the
SCRIPT function has other uses. For example, I use it to send
patches to my synth without having to quit, load a librarian, etc.
Following is a more detailed description of the Script Processor
and it's use. Please note that all commands must be in upper case,
and all numbers must be in decimal. There can only be one command
or number per line, and a blank line must not contain anything
but a carriage return.
The EDIT MIDI button will show another dialog containing the voice
names, midi channels, midi presets, and octave ranges. These values
may be changed (except for song name), by clicking on the value, and
moving the mouse up or down while holding the button down. The new
values are stored in a temporary buffer, and can be restored to their
original settings with the RESTORE button. You can also select a
drum pattern stored in your drum machine by click/dragging the
Drum Song select field.
The PLAY SONG button will cause the song currently in memory to
begin playing. A new dialog will appear, showing the song name
(if it was stored in the Music Studio file), and a list of all
instruments stored with this song. A red note symbol will blink
by each voice that is currently playing. I have found a couple
of songs that were adversely affected by the blinking notes, so
I have included the option to turn the note display off. Pressing
'N' will toggle the note display on or off.
The JUKEBOX button will load and play each song in the current
working directory. While using this function, you can abort the
current song and skip to the next one by pressing the space bar.
Pressing X will abort the jukebox and return you to the main menu.
The Script Processor
--------------------
The Player program will load a script file and automatically execute
any commands and play any songs contained in that file. All filenames
in the script file must be a complete, valid file name with drive
identifier and path. For example, c:\music\mysong.sng is a valid file
name. \music\mysong is not (no drive identifier.) You may only place
one command or number on each line of the script file, and the script
must be saved with the extension .LST. The script processor looks at the
first column in each line of the script file to determine what to do
with the command. A carriage return is ignored, and a ! indicates a
comment, which is also ignored. The # character indicates a command, and
anything else is assumed to be a Music Studio file to be played. All
commands for a particular song must be listed in the file before the
filename itself. Following is a list of valid commands and their use,
notice that all commands must be entered in upper case!
#DRUMON
Enables the midi clock which allows drum machines to stay in sync with
the song.
#DRUMOFF
Disables the midi clock - no clock pulses will be sent.
#SETDRUM
(pattern)
If your drum machine responds to Midi Song Select, this command will
allow you to select the song pattern. The line following this command
must contain a single number in the range 0-127, corresponding to the
song pattern you want selected.
#CHANNELON
Forces all voices in the song to play on channel 1
#CHANNELOFF
Allows all voices to play on their assigned channel.
#PRESETON
Allows the Player program to send program change requests.
#PRESETOFF
Disables Player program change requests.
#SENDTEMPO
(tempo)
Changes the tempo for the song. On the line following this command
must be a single number in the range 1-200.
#SENDVOLUME
(volume)
If your synth is velocity sensitive, this will change the volume of
the song. The line following this command must contain a single number
in the range 1-127.
#SENDPRESET
(preset #)
This command will send a program change request to your synth. There
must be two lines following this command. The first line must contain
a number in the range 0-15, which will be the desired channel for the
program change. The next line must contain a number in the range
0-127, which is the preset number to send.
#SENDBYTES
This command will allow you to send any type of message out to your
synths. Every number between this command and the #ENDSEND command will
be sent out the midi port. This command can be used to initiate any type
of sysex dump, program change, etc. For example, the sequence:
#SENDBYTES
240
67
32
3
247
#ENDSEND
will cause a TX81Z assigned to channel 0 to dump it's memory for Bank I
out to midi.
#ENDSEND
Indicates the end of bytes to send. See #SENDBYTES above.
#SENDFILE
(filename)
(count or #ENDSEND)
This command will load a disk file into memory, then dump it out to midi.
The line following this command must contain a complete, valid pathname
(with drive identifier.) The next line must contain either the command
#ENDSEND, or the number of bytes to send. If your file contains padding
characters at the end which you don't want sent, and you know the exact
number of bytes you want to send, place the count on this line. If your
file contains the correct number or characters, or you are unsure what the
length of the dump should be, use the #ENDSEND command (and hope for the
best!)
This command can be used, for example, to send the output from an
editor/librarian program which is in sysex format (such as TXLIBR21.PRG)
to your synths, and load an entire bank with voices before the song begins.
- - - - - - - - - -
At the present time, these are all the commands recognised by the Script
Processor. See the included file "SCRIPT.LST" for examples of the above
commands. There are other commands being added to the Script Processor,
and I hope to write a decent parser that will allow you to place all of a
command on a single line, before this program is officially declared
'finished'. Planned additions include:
#DOSCRIPT
(filename)
Transfer control to another script file.
#WAIT
(count)
Will wait until a specified number of bytes have been read from the
midi port. (This is currently implemented, but listed as not working
because any machines which may be transmitting data constantly (such
as my drum machine) foul things up...)
#RECORD
(count)
Will read a specified number of bytes from the midi port and save them
in memory.
#SAVEDUMP
(filename)
Saves the data acquired with the #RECORD command into a specified disk
file.
The #WAIT command will be useful for those synths that require "handshaking"
(such as Casio) before sending or receiving sysex data. #RECORD and
#SAVEDUMP will allow you to record sysex data from your synth and save it
to disk. The addition of these commands should allow you to record, save,
and send almost any type of midi data.